# Docker for CentOS6.8 Base

# Base image
FROM registry.cn-shenzhen.aliyuncs.com/jc76439984/centos6.8-base:official

MAINTAINER "JC <76439984@qq.com>"

# yum源
ADD epel-6.repo /etc/yum.repos.d/

# Base pkg
RUN yum -y install lrzsz vim openssh-clients openssh-devel \
openssh-server wget python-pip mysql-devel git redis \
tree net-tools sudo monit && \
yum clean all && \
\cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# For SSHD
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key && \
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key && \
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key && \
echo "root:1234-qwer" | chpasswd

# For monit
ADD sshd.conf /etc/monit.d/sshd.conf
# EXPOSE
EXPOSE 22

CMD ["/usr/bin/monit","-I"]